package ModelLayer;

/**
 * Write a description of class Person here.
 * 
 * @author (your name) 
 * @version (a version number or a date)
 */
public class Person
{
    // instance variables - replace the example below with your own
    private long id;
    private String name;
    private String address;
    private int postalCode;
    private String city;
    private int phone;

    public Person(long id, String name, String address, int postalCode, String city, int phone)
    {    
        this.id = id;
        this.name = name;
        this.address = address;
        this.postalCode = postalCode;
        this.city = city;
        this.phone = phone; 
    }

    //get methods    
    public long getID()
    {
        return id;
    }

    public String getName()
    {
        return name;
    }

    public String getAddress()
    {
        return address;
    }

    public int getPostalCode()
    {
        return postalCode;
    }

    public String getCity()
    {
        return city;
    }

    public int getPhone()
    {
        return phone;
    }
    
    //set methods
    public void setID(long id)
    {
        this.id = id;
    }
    
    public void setName(String name)
    {
        this.name = name;
    }
    
    public void setAddress(String address)
    {
        this.address = address;
    }
    
    public void setPostalCode(int postalCode)
    {
        this.postalCode = postalCode;
    }
    
    public void setCity(String city)
    {
        this.city = city;
    }
    
    public void setPhone(int phone)
    {
        this.phone = phone;
    }
    
    public void printDetail()
    {
        if(getID() != 0)
        {
        System.out.println();
        System.out.println("#----------------------------------");
        System.out.println("# ID :"+ id);
        System.out.println("# name :"+ name);
        System.out.println("# address :"+ address);
        System.out.println("# postalCode :"+ postalCode);
        System.out.println("# city :"+ city);
        System.out.println("# phone :"+ phone);
    }
    else
    {
        System.out.println("No person created! - try 2(add persons)");
    }
    }
    
}
